home *** CD-ROM | disk | FTP | other *** search
/ Aminet 35 / Aminet 35 (2000)(Schatztruhe)[!][Feb 2000].iso / Aminet / gfx / misc / gnuplot-src.lha / gnuplot-3.7.1src / gnuplot-3.7.1.lha / gnuplot-3.7.1 / hrcgraph.asm < prev    next >
Unknown  |  1998-04-15  |  8.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 54 49 54 4c 45 09 48 65 | 72 63 75 6c 00 01 00 00 |TITLE.He|rcul....|
|00000010| 01 02 00 01 00 00 04 07 | 20 77 69 6c 6c 65 0a 0a |........| wille..|
|00000020| 3b 09 4d 69 63 68 61 65 | 6c 20 47 6f 72 64 6f 6e |;.Michae|l Gordon|
|00000030| 20 2d 20 38 2d 44 65 63 | 2d 38 36 0a 3b 0a 3b 20 | - 8-Dec|-86.;.; |
|00000040| 43 65 72 74 61 69 6e 20 | 72 6f 75 74 69 6e 65 73 |Certain |routines|
|00000050| 20 77 65 72 65 20 74 61 | 6b 65 6e 20 66 72 6f 6d | were ta|ken from|
|00000060| 20 74 68 65 20 48 65 72 | 63 75 6c 65 73 20 42 49 | the Her|cules BI|
|00000070| 4f 53 20 6f 66 09 44 61 | 76 65 20 54 75 74 65 6c |OS of.Da|ve Tutel|
|00000080| 6d 61 6e 20 2d 20 38 2f | 38 36 0a 3b 20 4f 74 68 |man - 8/|86.; Oth|
|00000090| 65 72 73 20 63 61 6d 65 | 20 66 72 6f 6d 20 70 63 |ers came| from pc|
|000000a0| 67 72 61 70 68 2e 61 73 | 6d 20 69 6e 63 6c 75 64 |graph.as|m includ|
|000000b0| 65 64 20 69 6e 20 47 4e | 55 50 4c 4f 54 20 62 79 |ed in GN|UPLOT by|
|000000c0| 20 43 6f 6c 69 6e 20 4b | 65 6c 6c 65 79 0a 3b 0a | Colin K|elley.;.|
|000000d0| 3b 20 6d 6f 64 69 66 69 | 65 64 20 73 6c 69 67 68 |; modifi|ed sligh|
|000000e0| 74 6c 79 20 62 79 20 43 | 6f 6c 69 6e 20 4b 65 6c |tly by C|olin Kel|
|000000f0| 6c 65 79 20 2d 20 32 32 | 2d 44 65 63 2d 38 36 0a |ley - 22|-Dec-86.|
|00000100| 3b 09 61 64 64 65 64 20 | 68 65 61 64 65 72 2e 6d |;.added |header.m|
|00000110| 61 63 2c 20 70 61 72 61 | 6d 65 74 65 72 69 7a 65 |ac, para|meterize|
|00000120| 64 20 64 65 63 6c 61 72 | 61 74 69 6f 6e 73 0a 3b |d declar|ations.;|
|00000130| 20 61 64 64 65 64 20 64 | 67 72 6f 75 70 3a 20 69 | added d|group: i|
|00000140| 6e 20 48 56 6d 6f 64 65 | 6d 20 74 6f 20 72 65 61 |n HVmode|m to rea|
|00000150| 63 68 20 48 43 68 5f 50 | 61 72 6d 73 20 61 6e 64 |ch HCh_P|arms and|
|00000160| 20 48 47 72 5f 50 61 72 | 6d 73 20 2d 20 33 30 2d | HGr_Par|ms - 30-|
|00000170| 4a 61 6e 2d 38 37 0a 3b | 20 6d 6f 64 69 66 69 65 |Jan-87.;| modifie|
|00000180| 64 20 62 79 20 52 75 73 | 73 65 6c 6c 20 4c 61 6e |d by Rus|sell Lan|
|00000190| 67 20 33 20 4a 75 6e 20 | 31 39 38 38 0a 3b 09 61 |g 3 Jun |1988.;.a|
|000001a0| 64 64 65 64 20 48 5f 69 | 6e 69 74 0a 0a 69 6e 63 |dded H_i|nit..inc|
|000001b0| 6c 75 64 65 20 68 65 61 | 64 65 72 2e 6d 61 63 0a |lude hea|der.mac.|
|000001c0| 0a 69 66 31 0a 69 6e 63 | 6c 75 64 65 20 6c 69 6e |.if1.inc|lude lin|
|000001d0| 65 70 72 6f 63 2e 6d 61 | 63 0a 65 6e 64 69 66 0a |eproc.ma|c.endif.|
|000001e0| 0a 0a 47 50 67 31 5f 42 | 61 73 65 20 65 71 75 20 |..GPg1_B|ase equ |
|000001f0| 30 42 38 30 30 68 09 3b | 20 47 72 61 70 68 69 63 |0B800h.;| Graphic|
|00000200| 73 20 70 61 67 65 20 31 | 20 62 61 73 65 20 61 64 |s page 1| base ad|
|00000210| 64 72 65 73 73 0a 0a 5f | 74 65 78 74 09 73 65 67 |dress.._|text.seg|
|00000220| 6d 65 6e 74 0a 0a 09 70 | 75 62 6c 69 63 20 5f 48 |ment...p|ublic _H|
|00000230| 5f 6c 69 6e 65 2c 20 5f | 48 5f 63 6f 6c 6f 72 2c |_line, _|H_color,|
|00000240| 20 5f 48 5f 6d 61 73 6b | 2c 20 5f 48 56 6d 6f 64 | _H_mask|, _HVmod|
|00000250| 65 2c 20 5f 48 5f 70 75 | 74 73 0a 09 70 75 62 6c |e, _H_pu|ts..publ|
|00000260| 69 63 20 5f 48 5f 69 6e | 69 74 0a 0a 48 43 66 67 |ic _H_in|it..HCfg|
|00000270| 5f 53 77 69 74 63 68 20 | 65 71 75 09 30 33 42 46 |_Switch |equ.03BF|
|00000280| 48 09 3b 20 43 6f 6e 66 | 69 67 75 72 61 74 69 6f |H.; Conf|iguratio|
|00000290| 6e 20 53 77 69 74 63 68 | 20 2d 20 73 6f 66 74 77 |n Switch| - softw|
|000002a0| 61 72 65 20 73 77 69 74 | 63 68 20 0a 09 09 09 3b |are swit|ch ....;|
|000002b0| 20 74 6f 20 73 65 6c 65 | 63 74 20 67 72 61 70 68 | to sele|ct graph|
|000002c0| 69 63 73 20 63 61 72 64 | 20 6d 65 6d 6f 72 79 20 |ics card| memory |
|000002d0| 6d 61 70 0a 0a 62 65 67 | 69 6e 70 72 6f 63 20 5f |map..beg|inproc _|
|000002e0| 48 5f 69 6e 69 74 0a 09 | 6d 6f 76 20 61 6c 2c 20 |H_init..|mov al, |
|000002f0| 30 33 48 09 3b 20 61 6c | 6c 6f 77 20 67 72 61 70 |03H.; al|low grap|
|00000300| 68 69 63 73 20 69 6e 20 | 62 38 30 30 30 3a 62 66 |hics in |b8000:bf|
|00000310| 66 66 66 0a 09 6d 6f 76 | 20 64 78 2c 20 48 43 66 |fff..mov| dx, HCf|
|00000320| 67 5f 53 77 69 74 63 68 | 0a 09 6f 75 74 20 64 78 |g_Switch|..out dx|
|00000330| 2c 20 61 6c 0a 09 72 65 | 74 0a 5f 48 5f 69 6e 69 |, al..re|t._H_ini|
|00000340| 74 20 65 6e 64 70 0a 0a | 68 70 69 78 65 6c 09 70 |t endp..|hpixel.p|
|00000350| 72 6f 63 20 6e 65 61 72 | 0a 09 72 6f 72 20 77 6f |roc near|..ror wo|
|00000360| 72 64 20 70 74 72 20 62 | 6d 61 73 6b 2c 31 0a 09 |rd ptr b|mask,1..|
|00000370| 6a 63 20 63 6f 6e 74 0a | 09 72 65 74 0a 63 6f 6e |jc cont.|.ret.con|
|00000380| 74 3a 0a 09 70 75 73 68 | 20 61 78 0a 09 70 75 73 |t:..push| ax..pus|
|00000390| 68 20 62 78 0a 09 70 75 | 73 68 20 63 78 0a 09 70 |h bx..pu|sh cx..p|
|000003a0| 75 73 68 20 64 78 0a 09 | 70 75 73 68 20 73 69 0a |ush dx..|push si.|
|000003b0| 09 6d 6f 76 20 63 78 2c | 61 78 09 09 3b 20 78 0a |.mov cx,|ax..; x.|
|000003c0| 09 6d 6f 76 20 64 78 2c | 62 78 09 09 3b 20 79 0a |.mov dx,|bx..; y.|
|000003d0| 3b 0a 3b 20 5b 63 6f 75 | 6c 64 6e 27 74 20 74 68 |;.; [cou|ldn't th|
|000003e0| 69 73 20 62 65 20 64 6f | 6e 65 20 66 61 73 74 65 |is be do|ne faste|
|000003f0| 72 20 77 69 74 68 20 61 | 20 6c 6f 6f 6b 75 70 20 |r with a| lookup |
|00000400| 74 61 62 6c 65 3f 20 2d | 63 64 6b 5d 0a 3b 0a 09 |table? -|cdk].;..|
|00000410| 3b 20 66 69 72 73 74 20 | 63 6f 6d 70 75 74 65 20 |; first |compute |
|00000420| 74 68 65 20 61 64 64 72 | 65 73 73 20 6f 66 20 62 |the addr|ess of b|
|00000430| 79 74 65 20 74 6f 20 62 | 65 20 6d 6f 64 69 66 69 |yte to b|e modifi|
|00000440| 65 64 0a 09 3b 20 3d 20 | 39 30 2a 5b 72 6f 77 2f |ed..; = |90*[row/|
|00000450| 34 5d 20 2b 20 5b 63 6f | 6c 2f 38 5d 20 2b 20 32 |4] + [co|l/8] + 2|
|00000460| 5e 44 2a 5b 72 6f 77 2f | 34 5d 20 2b 20 32 5e 46 |^D*[row/|4] + 2^F|
|00000470| 2a 70 61 67 65 0a 09 6d | 6f 76 09 62 68 2c 63 6c |*page..m|ov.bh,cl|
|00000480| 09 09 3b 20 63 6f 6c 20 | 28 6c 6f 77 20 6f 72 64 |..; col |(low ord|
|00000490| 65 72 29 20 69 6e 20 42 | 48 0a 09 6d 6f 76 09 62 |er) in B|H..mov.b|
|000004a0| 6c 2c 64 6c 09 09 3b 20 | 72 6f 77 20 28 6c 6f 77 |l,dl..; |row (low|
|000004b0| 20 6f 72 64 65 72 29 20 | 69 6e 20 42 4c 0a 09 61 | order) |in BL..a|
|000004c0| 6e 64 09 62 78 2c 30 37 | 30 33 48 09 3b 20 6d 61 |nd.bx,07|03H.; ma|
|000004d0| 73 6b 20 74 68 65 20 63 | 6f 6c 20 26 20 72 6f 77 |sk the c|ol & row|
|000004e0| 20 72 65 6d 61 69 6e 64 | 65 72 73 0a 49 46 44 45 | remaind|ers.IFDE|
|000004f0| 46 20 69 41 50 58 32 38 | 36 0a 09 73 68 72 09 63 |F iAPX28|6..shr.c|
|00000500| 78 2c 33 09 09 3b 20 63 | 6f 6c 20 2f 20 38 0a 09 |x,3..; c|ol / 8..|
|00000510| 73 68 72 09 64 78 2c 32 | 09 09 3b 20 72 6f 77 20 |shr.dx,2|..; row |
|00000520| 2f 20 34 0a 09 6d 6f 76 | 09 61 6c 2c 39 30 0a 09 |/ 4..mov|.al,90..|
|00000530| 6d 75 6c 09 64 78 09 09 | 3b 20 41 58 20 3d 20 39 |mul.dx..|; AX = 9|
|00000540| 30 2a 5b 20 72 6f 77 2f | 34 20 5d 0a 09 61 64 64 |0*[ row/|4 ]..add|
|00000550| 09 61 78 2c 63 78 09 09 | 3b 20 20 2e 2e 2e 20 2b |.ax,cx..|; ... +|
|00000560| 20 63 6f 6c 2f 38 0a 09 | 73 68 6c 09 62 6c 2c 35 | col/8..|shl.bl,5|
|00000570| 09 09 3b 20 61 6c 69 67 | 6e 20 72 6f 77 20 72 65 |..; alig|n row re|
|00000580| 6d 61 69 6e 64 65 72 0a | 45 4c 53 45 09 09 09 3b |mainder.|ELSE...;|
|00000590| 20 73 61 6d 65 20 61 73 | 20 61 62 6f 76 65 2c 20 | same as| above, |
|000005a0| 6f 62 73 63 75 72 65 20 | 62 75 74 20 66 61 73 74 |obscure |but fast|
|000005b0| 20 66 6f 72 20 38 30 38 | 36 0a 09 73 68 72 09 63 | for 808|6..shr.c|
|000005c0| 78 2c 31 09 09 3b 20 64 | 69 76 69 64 65 20 63 6f |x,1..; d|ivide co|
|000005d0| 6c 20 62 79 20 38 0a 09 | 73 68 72 09 63 78 2c 31 |l by 8..|shr.cx,1|
|000005e0| 0a 09 73 68 72 09 63 78 | 2c 31 0a 09 73 68 72 09 |..shr.cx|,1..shr.|
|000005f0| 64 78 2c 31 09 09 3b 20 | 64 69 76 69 64 65 20 72 |dx,1..; |divide r|
|00000600| 6f 77 20 62 79 20 34 0a | 09 73 68 72 09 64 78 2c |ow by 4.|.shr.dx,|
|00000610| 31 0a 09 73 68 6c 09 64 | 78 2c 31 09 09 3b 20 62 |1..shl.d|x,1..; b|
|00000620| 65 67 69 6e 20 66 61 73 | 74 20 6d 75 6c 74 69 70 |egin fas|t multip|
|00000630| 6c 79 20 62 79 20 39 30 | 20 28 31 30 31 31 30 31 |ly by 90| (101101|
|00000640| 30 20 42 29 0a 09 6d 6f | 76 09 61 78 2c 64 78 0a |0 B)..mo|v.ax,dx.|
|00000650| 09 73 68 6c 09 64 78 2c | 31 0a 09 73 68 6c 09 64 |.shl.dx,|1..shl.d|
|00000660| 78 2c 31 0a 09 61 64 64 | 09 61 78 2c 64 78 0a 09 |x,1..add|.ax,dx..|
|00000670| 73 68 6c 09 64 78 2c 31 | 0a 09 61 64 64 09 61 78 |shl.dx,1|..add.ax|
|00000680| 2c 64 78 0a 09 73 68 6c | 09 64 78 2c 31 0a 09 73 |,dx..shl|.dx,1..s|
|00000690| 68 6c 09 64 78 2c 31 0a | 09 61 64 64 09 61 78 2c |hl.dx,1.|.add.ax,|
|000006a0| 64 78 09 09 3b 20 65 6e | 64 20 66 61 73 74 20 6d |dx..; en|d fast m|
|000006b0| 75 6c 74 69 70 6c 79 20 | 62 79 20 39 30 0a 09 61 |ultiply |by 90..a|
|000006c0| 64 64 09 61 78 2c 63 78 | 09 09 3b 20 61 64 64 20 |dd.ax,cx|..; add |
|000006d0| 6f 6e 20 74 68 65 20 63 | 6f 6c 2f 38 0a 09 73 68 |on the c|ol/8..sh|
|000006e0| 6c 09 62 6c 2c 31 09 09 | 3b 20 61 6c 69 67 6e 20 |l.bl,1..|; align |
|000006f0| 72 6f 77 20 72 65 6d 61 | 69 6e 64 65 72 0a 09 73 |row rema|inder..s|
|00000700| 68 6c 09 62 6c 2c 31 0a | 09 73 68 6c 09 62 6c 2c |hl.bl,1.|.shl.bl,|
|00000710| 31 0a 09 73 68 6c 09 62 | 6c 2c 31 0a 09 73 68 6c |1..shl.b|l,1..shl|
|00000720| 09 62 6c 2c 31 0a 45 4e | 44 49 46 0a 09 61 64 64 |.bl,1.EN|DIF..add|
|00000730| 09 61 68 2c 62 6c 09 09 | 3b 20 75 73 65 20 61 6c |.ah,bl..|; use al|
|00000740| 69 67 6e 65 64 20 72 6f | 77 20 72 65 6d 61 69 6e |igned ro|w remain|
|00000750| 64 65 72 0a 65 6e 64 5f | 61 64 72 5f 63 61 6c 63 |der.end_|adr_calc|
|00000760| 3a 09 09 09 3b 20 61 64 | 64 72 65 73 73 20 6f 66 |:...; ad|dress of|
|00000770| 20 62 79 74 65 20 69 73 | 20 6e 6f 77 20 69 6e 20 | byte is| now in |
|00000780| 41 58 0a 09 6d 6f 76 09 | 64 78 2c 47 50 67 31 5f |AX..mov.|dx,GPg1_|
|00000790| 42 61 73 65 09 3b 20 62 | 61 73 65 20 6f 66 20 70 |Base.; b|ase of p|
|000007a0| 69 78 65 6c 20 64 69 73 | 70 6c 61 79 20 74 6f 20 |ixel dis|play to |
|000007b0| 44 58 0a 09 6d 6f 76 09 | 65 73 2c 64 78 09 09 3b |DX..mov.|es,dx..;|
|000007c0| 20 2e 2e 2e 61 6e 64 20 | 74 68 65 6e 63 65 20 74 | ...and |thence t|
|000007d0| 6f 20 73 65 67 6d 65 6e | 74 20 72 65 67 0a 09 6d |o segmen|t reg..m|
|000007e0| 6f 76 09 73 69 2c 61 78 | 09 09 3b 20 61 64 64 72 |ov.si,ax|..; addr|
|000007f0| 65 73 73 20 6f 66 20 62 | 79 74 65 20 77 2f 20 70 |ess of b|yte w/ p|
|00000800| 69 78 65 6c 20 74 6f 20 | 69 6e 64 65 78 20 72 65 |ixel to |index re|
|00000810| 67 0a 09 6d 6f 76 09 63 | 6c 2c 62 68 09 09 3b 20 |g..mov.c|l,bh..; |
|00000820| 62 69 74 20 61 64 64 72 | 20 69 6e 20 62 79 74 65 |bit addr| in byte|
|00000830| 0a 09 6d 6f 76 09 61 6c | 2c 38 30 48 09 09 3b 20 |..mov.al|,80H..; |
|00000840| 27 31 30 30 30 20 30 30 | 30 30 27 20 69 6e 20 41 |'1000 00|00' in A|
|00000850| 4c 20 0a 09 73 68 72 09 | 61 6c 2c 63 6c 09 09 3b |L ..shr.|al,cl..;|
|00000860| 20 73 68 69 66 74 20 6d | 61 73 6b 20 74 6f 20 6c | shift m|ask to l|
|00000870| 69 6e 65 20 75 70 20 77 | 69 74 68 20 62 69 74 20 |ine up w|ith bit |
|00000880| 74 6f 20 72 65 61 64 2f | 77 72 69 74 65 0a 73 65 |to read/|write.se|
|00000890| 74 5f 70 69 78 3a 09 09 | 09 3b 20 73 65 74 20 74 |t_pix:..|.; set t|
|000008a0| 68 65 20 70 69 78 65 6c | 0a 09 6f 72 09 65 73 3a |he pixel|..or.es:|
|000008b0| 5b 73 69 5d 2c 61 6c 09 | 3b 20 6f 72 20 74 68 65 |[si],al.|; or the|
|000008c0| 20 6d 61 73 6b 20 77 69 | 74 68 20 74 68 65 20 72 | mask wi|th the r|
|000008d0| 69 67 68 74 20 62 79 74 | 65 0a 09 70 6f 70 20 73 |ight byt|e..pop s|
|000008e0| 69 0a 09 70 6f 70 20 64 | 78 0a 09 70 6f 70 20 63 |i..pop d|x..pop c|
|000008f0| 78 0a 09 70 6f 70 20 62 | 78 0a 09 70 6f 70 20 61 |x..pop b|x..pop a|
|00000900| 78 0a 09 72 65 74 0a 68 | 70 69 78 65 6c 20 65 6e |x..ret.h|pixel en|
|00000910| 64 70 0a 0a 6c 69 6e 65 | 70 72 6f 63 20 5f 48 5f |dp..line|proc _H_|
|00000920| 6c 69 6e 65 2c 20 68 70 | 69 78 65 6c 0a 0a 3b 0a |line, hp|ixel..;.|
|00000930| 3b 20 63 6c 65 61 72 20 | 2d 20 63 6c 65 61 72 20 |; clear |- clear |
|00000940| 70 61 67 65 20 31 20 6f | 66 20 74 68 65 20 73 63 |page 1 o|f the sc|
|00000950| 72 65 65 6e 20 62 75 66 | 66 65 72 20 74 6f 20 7a |reen buf|fer to z|
|00000960| 65 72 6f 20 28 65 66 66 | 65 63 74 69 76 65 6c 79 |ero (eff|ectively|
|00000970| 2c 20 62 6c 61 6e 6b 0a | 3b 09 74 68 65 20 73 63 |, blank.|;.the sc|
|00000980| 72 65 65 6e 29 0a 3b 0a | 63 6c 65 61 72 20 20 20 |reen).;.|clear |
|00000990| 70 72 6f 63 20 6e 65 61 | 72 0a 09 70 75 73 68 20 |proc nea|r..push |
|000009a0| 65 73 0a 09 70 75 73 68 | 20 61 78 0a 09 70 75 73 |es..push| ax..pus|
|000009b0| 68 20 63 78 0a 09 70 75 | 73 68 20 64 69 0a 09 6d |h cx..pu|sh di..m|
|000009c0| 6f 76 20 61 78 2c 20 47 | 50 67 31 5f 42 61 73 65 |ov ax, G|Pg1_Base|
|000009d0| 0a 09 6d 6f 76 20 65 73 | 2c 20 61 78 0a 09 78 6f |..mov es|, ax..xo|
|000009e0| 72 20 64 69 2c 20 64 69 | 0a 09 6d 6f 76 20 63 78 |r di, di|..mov cx|
|000009f0| 2c 20 34 30 30 30 68 0a | 09 78 6f 72 20 61 78 2c |, 4000h.|.xor ax,|
|00000a00| 20 61 78 0a 09 63 6c 64 | 0a 09 72 65 70 20 73 74 | ax..cld|..rep st|
|00000a10| 6f 73 77 09 09 09 3b 20 | 7a 65 72 6f 20 6f 75 74 |osw...; |zero out|
|00000a20| 20 73 63 72 65 65 6e 20 | 70 61 67 65 0a 09 70 6f | screen |page..po|
|00000a30| 70 20 64 69 0a 09 70 6f | 70 20 63 78 0a 09 70 6f |p di..po|p cx..po|
|00000a40| 70 20 61 78 0a 09 70 6f | 70 20 65 73 0a 09 72 65 |p ax..po|p es..re|
|00000a50| 74 0a 63 6c 65 61 72 09 | 65 6e 64 70 0a 0a 62 65 |t.clear.|endp..be|
|00000a60| 67 69 6e 70 72 6f 63 20 | 5f 48 5f 63 6f 6c 6f 72 |ginproc |_H_color|
|00000a70| 0a 09 70 75 73 68 20 62 | 70 0a 09 6d 6f 76 20 62 |..push b|p..mov b|
|00000a80| 70 2c 73 70 0a 09 6d 6f | 76 20 61 6c 2c 5b 62 70 |p,sp..mo|v al,[bp|
|00000a90| 2b 58 5d 09 09 09 3b 20 | 63 6f 6c 6f 72 0a 09 6d |+X]...; |color..m|
|00000aa0| 6f 76 20 62 79 74 65 20 | 70 74 72 20 63 6f 6c 6f |ov byte |ptr colo|
|00000ab0| 72 2c 61 6c 0a 09 70 6f | 70 20 62 70 0a 09 72 65 |r,al..po|p bp..re|
|00000ac0| 74 0a 5f 48 5f 63 6f 6c | 6f 72 20 65 6e 64 70 0a |t._H_col|or endp.|
|00000ad0| 0a 62 65 67 69 6e 70 72 | 6f 63 20 5f 48 5f 6d 61 |.beginpr|oc _H_ma|
|00000ae0| 73 6b 0a 09 70 75 73 68 | 20 62 70 0a 09 6d 6f 76 |sk..push| bp..mov|
|00000af0| 20 62 70 2c 73 70 0a 09 | 6d 6f 76 20 61 78 2c 5b | bp,sp..|mov ax,[|
|00000b00| 62 70 2b 58 5d 09 09 09 | 3b 20 6d 61 73 6b 0a 09 |bp+X]...|; mask..|
|00000b10| 6d 6f 76 20 77 6f 72 64 | 20 70 74 72 20 62 6d 61 |mov word| ptr bma|
|00000b20| 73 6b 2c 61 78 0a 09 70 | 6f 70 20 62 70 0a 09 72 |sk,ax..p|op bp..r|
|00000b30| 65 74 0a 5f 48 5f 6d 61 | 73 6b 20 65 6e 64 70 0a |et._H_ma|sk endp.|
|00000b40| 0a 48 43 74 72 6c 5f 50 | 6f 72 74 09 65 71 75 09 |.HCtrl_P|ort.equ.|
|00000b50| 30 33 42 38 48 09 3b 20 | 48 65 72 63 75 6c 65 73 |03B8H.; |Hercules|
|00000b60| 20 36 38 34 35 20 63 6f | 6e 74 72 6f 6c 20 70 6f | 6845 co|ntrol po|
|00000b70| 72 74 20 49 4f 20 61 64 | 64 72 0a 48 49 6e 64 78 |rt IO ad|dr.HIndx|
|00000b80| 5f 50 6f 72 74 09 65 71 | 75 09 30 33 42 34 48 09 |_Port.eq|u.03B4H.|
|00000b90| 3b 20 48 65 72 63 75 6c | 65 73 20 36 38 34 35 20 |; Hercul|es 6845 |
|00000ba0| 69 6e 64 65 78 20 70 6f | 72 74 20 49 4f 20 61 64 |index po|rt IO ad|
|00000bb0| 64 72 0a 48 53 63 72 6e | 5f 45 6e 61 62 6c 65 09 |dr.HScrn|_Enable.|
|00000bc0| 65 71 75 09 30 30 38 68 | 09 3b 20 43 6f 6e 74 72 |equ.008h|.; Contr|
|00000bd0| 6f 6c 20 70 6f 72 74 20 | 62 69 74 20 74 6f 20 65 |ol port |bit to e|
|00000be0| 6e 61 62 6c 65 20 76 69 | 64 65 6f 0a 48 43 68 5f |nable vi|deo.HCh_|
|00000bf0| 4d 6f 64 65 09 65 71 75 | 09 30 32 30 68 09 3b 20 |Mode.equ|.020h.; |
|00000c00| 43 68 61 72 61 63 74 65 | 72 20 6f 75 74 70 75 74 |Characte|r output|
|00000c10| 20 6d 6f 64 65 0a 48 47 | 72 5f 4d 6f 64 65 09 65 | mode.HG|r_Mode.e|
|00000c20| 71 75 09 30 38 32 68 09 | 3b 20 47 72 61 70 68 69 |qu.082h.|; Graphi|
|00000c30| 63 73 20 6f 75 74 70 75 | 74 20 6d 6f 64 65 20 70 |cs outpu|t mode p|
|00000c40| 61 67 65 20 31 0a 0a 70 | 61 72 6d 5f 63 6f 75 6e |age 1..p|arm_coun|
|00000c50| 74 20 65 71 75 20 31 32 | 0a 0a 62 65 67 69 6e 70 |t equ 12|..beginp|
|00000c60| 72 6f 63 20 5f 48 56 6d | 6f 64 65 0a 09 70 75 73 |roc _HVm|ode..pus|
|00000c70| 68 20 62 70 0a 09 6d 6f | 76 20 62 70 2c 20 73 70 |h bp..mo|v bp, sp|
|00000c80| 0a 09 70 75 73 68 20 73 | 69 0a 09 6d 6f 76 20 61 |..push s|i..mov a|
|00000c90| 78 2c 20 5b 62 70 2b 58 | 5d 0a 09 6f 72 20 61 68 |x, [bp+X|]..or ah|
|00000ca0| 2c 20 61 6c 0a 09 6d 6f | 76 20 61 6c 2c 20 48 43 |, al..mo|v al, HC|
|00000cb0| 68 5f 4d 6f 64 65 09 09 | 3b 20 41 73 73 75 6d 65 |h_Mode..|; Assume|
|00000cc0| 20 63 68 61 72 61 63 74 | 65 72 20 6d 6f 64 65 20 | charact|er mode |
|00000cd0| 69 73 20 77 61 6e 74 65 | 64 0a 09 6d 6f 76 20 73 |is wante|d..mov s|
|00000ce0| 69 2c 20 6f 66 66 73 65 | 74 20 64 67 72 6f 75 70 |i, offse|t dgroup|
|00000cf0| 3a 48 43 68 5f 50 61 72 | 6d 73 0a 09 63 6d 70 20 |:HCh_Par|ms..cmp |
|00000d00| 61 68 2c 20 30 09 09 09 | 3b 20 6e 6f 6e 7a 65 72 |ah, 0...|; nonzer|
|00000d10| 6f 20 6d 65 61 6e 73 20 | 73 77 69 74 63 68 20 74 |o means |switch t|
|00000d20| 6f 20 67 72 61 70 68 69 | 63 73 0a 09 6a 7a 20 76 |o graphi|cs..jz v|
|00000d30| 6d 6f 64 65 5f 6f 6b 0a | 09 63 61 6c 6c 20 6e 65 |mode_ok.|.call ne|
|00000d40| 61 72 20 70 74 72 20 63 | 6c 65 61 72 09 09 3b 20 |ar ptr c|lear..; |
|00000d50| 63 6c 65 61 72 20 74 68 | 65 20 67 72 61 70 68 69 |clear th|e graphi|
|00000d60| 63 73 20 70 61 67 65 0a | 09 6d 6f 76 20 61 6c 2c |cs page.|.mov al,|
|00000d70| 20 48 47 72 5f 4d 6f 64 | 65 0a 09 6d 6f 76 20 73 | HGr_Mod|e..mov s|
|00000d80| 69 2c 20 6f 66 66 73 65 | 74 20 64 67 72 6f 75 70 |i, offse|t dgroup|
|00000d90| 3a 48 47 72 5f 50 61 72 | 6d 73 0a 76 6d 6f 64 65 |:HGr_Par|ms.vmode|
|00000da0| 5f 6f 6b 3a 0a 09 6d 6f | 76 20 64 78 2c 20 48 43 |_ok:..mo|v dx, HC|
|00000db0| 74 72 6c 5f 50 6f 72 74 | 0a 09 6f 75 74 20 64 78 |trl_Port|..out dx|
|00000dc0| 2c 20 61 6c 09 09 09 3b | 20 53 65 74 20 48 65 72 |, al...;| Set Her|
|00000dd0| 63 75 6c 65 73 20 62 6f | 61 72 64 20 74 6f 20 70 |cules bo|ard to p|
|00000de0| 72 6f 70 65 72 20 6d 6f | 64 65 0a 09 63 61 6c 6c |roper mo|de..call|
|00000df0| 20 6e 65 61 72 20 70 74 | 72 20 73 65 74 50 61 72 | near pt|r setPar|
|00000e00| 6d 73 09 09 3b 20 53 65 | 74 20 74 68 65 20 36 38 |ms..; Se|t the 68|
|00000e10| 34 35 20 70 61 72 61 6d | 65 74 65 72 73 0a 09 6f |45 param|eters..o|
|00000e20| 72 20 61 6c 2c 20 48 53 | 63 72 6e 5f 45 6e 61 62 |r al, HS|crn_Enab|
|00000e30| 6c 65 09 09 3b 20 45 6e | 61 62 6c 65 20 74 68 65 |le..; En|able the|
|00000e40| 20 76 69 64 65 6f 20 6f | 75 74 70 75 74 0a 09 6f | video o|utput..o|
|00000e50| 75 74 20 64 78 2c 20 61 | 6c 0a 09 70 6f 70 20 73 |ut dx, a|l..pop s|
|00000e60| 69 0a 09 70 6f 70 20 62 | 70 0a 09 72 65 74 0a 5f |i..pop b|p..ret._|
|00000e70| 48 56 6d 6f 64 65 09 65 | 6e 64 70 0a 0a 73 65 74 |HVmode.e|ndp..set|
|00000e80| 50 61 72 6d 73 20 70 72 | 6f 63 20 6e 65 61 72 09 |Parms pr|oc near.|
|00000e90| 09 3b 20 53 65 6e 64 20 | 36 38 34 35 20 70 61 72 |.; Send |6845 par|
|00000ea0| 6d 73 20 74 6f 20 48 65 | 72 63 75 6c 65 73 20 62 |ms to He|rcules b|
|00000eb0| 6f 61 72 64 0a 09 70 75 | 73 68 20 61 78 0a 09 70 |oard..pu|sh ax..p|
|00000ec0| 75 73 68 20 64 78 0a 09 | 70 75 73 68 20 73 69 09 |ush dx..|push si.|
|00000ed0| 09 09 0a 09 6d 6f 76 20 | 64 78 2c 20 48 49 6e 64 |....mov |dx, HInd|
|00000ee0| 78 5f 50 6f 72 74 09 3b | 20 49 6e 64 65 78 20 70 |x_Port.;| Index p|
|00000ef0| 6f 72 74 20 61 64 64 72 | 20 2d 3e 20 44 58 0a 09 |ort addr| -> DX..|
|00000f00| 6d 6f 76 20 61 68 2c 20 | 30 09 09 3b 20 30 20 2d |mov ah, |0..; 0 -|
|00000f10| 3e 20 70 61 72 61 6d 65 | 74 65 72 20 63 6f 75 6e |> parame|ter coun|
|00000f20| 74 65 72 0a 73 70 5f 6c | 6f 6f 70 3a 0a 09 6d 6f |ter.sp_l|oop:..mo|
|00000f30| 76 20 61 6c 2c 20 61 68 | 0a 09 6f 75 74 20 64 78 |v al, ah|..out dx|
|00000f40| 2c 20 61 6c 09 09 3b 20 | 6f 75 74 70 75 74 20 74 |, al..; |output t|
|00000f50| 6f 20 36 38 34 35 20 61 | 64 64 72 20 72 65 67 69 |o 6845 a|ddr regi|
|00000f60| 73 74 65 72 0a 09 69 6e | 63 20 64 78 09 09 09 3b |ster..in|c dx...;|
|00000f70| 20 6e 65 78 74 20 6f 75 | 74 70 75 74 20 74 6f 20 | next ou|tput to |
|00000f80| 64 61 74 61 20 72 65 67 | 69 73 74 65 72 0a 09 6d |data reg|ister..m|
|00000f90| 6f 76 20 61 6c 2c 20 5b | 73 69 5d 09 09 3b 20 6e |ov al, [|si]..; n|
|00000fa0| 65 78 74 20 63 6f 6e 74 | 72 6f 6c 20 62 79 74 65 |ext cont|rol byte|
|00000fb0| 20 2d 3e 20 61 6c 0a 09 | 69 6e 63 20 73 69 0a 09 | -> al..|inc si..|
|00000fc0| 6f 75 74 20 64 78 2c 20 | 61 6c 09 09 3b 20 6f 75 |out dx, |al..; ou|
|00000fd0| 74 70 75 74 20 63 6f 6e | 74 72 6f 6c 20 62 79 74 |tput con|trol byt|
|00000fe0| 65 0a 09 64 65 63 20 64 | 78 09 09 09 3b 20 36 38 |e..dec d|x...; 68|
|00000ff0| 34 35 20 69 6e 64 65 78 | 20 61 64 64 72 20 2d 3e |45 index| addr ->|
|00001000| 20 64 78 0a 09 69 6e 63 | 20 61 68 09 09 09 3b 20 | dx..inc| ah...; |
|00001010| 62 75 6d 70 20 61 64 64 | 72 0a 09 63 6d 70 20 61 |bump add|r..cmp a|
|00001020| 68 2c 20 70 61 72 6d 5f | 63 6f 75 6e 74 0a 09 6a |h, parm_|count..j|
|00001030| 6e 7a 20 73 70 5f 6c 6f | 6f 70 0a 09 70 6f 70 20 |nz sp_lo|op..pop |
|00001040| 73 69 0a 09 70 6f 70 20 | 64 78 0a 09 70 6f 70 20 |si..pop |dx..pop |
|00001050| 61 78 0a 09 72 65 74 0a | 73 65 74 50 61 72 6d 73 |ax..ret.|setParms|
|00001060| 20 65 6e 64 70 0a 0a 3b | 20 48 5f 70 75 74 73 20 | endp..;| H_puts |
|00001070| 2d 20 70 72 69 6e 74 20 | 74 65 78 74 20 69 6e 20 |- print |text in |
|00001080| 67 72 61 70 68 69 63 73 | 20 6d 6f 64 65 0a 3b 0a |graphics| mode.;.|
|00001090| 3b 09 63 78 20 3d 20 72 | 6f 77 0a 3b 09 62 78 20 |;.cx = r|ow.;.bx |
|000010a0| 3d 20 63 6f 6c 75 6d 6e | 0a 3b 09 73 69 20 3d 20 |= column|.;.si = |
|000010b0| 61 64 64 72 65 73 73 20 | 6f 66 20 73 74 72 69 6e |address |of strin|
|000010c0| 67 20 28 6e 75 6c 6c 20 | 74 65 72 6d 69 6e 61 74 |g (null |terminat|
|000010d0| 65 64 29 20 74 6f 20 70 | 72 69 6e 74 0a 0a 62 65 |ed) to p|rint..be|
|000010e0| 67 69 6e 70 72 6f 63 20 | 5f 48 5f 70 75 74 73 0a |ginproc |_H_puts.|
|000010f0| 09 70 75 73 68 20 62 70 | 0a 09 6d 6f 76 20 62 70 |.push bp|..mov bp|
|00001100| 2c 20 73 70 0a 09 70 75 | 73 68 20 73 69 0a 09 70 |, sp..pu|sh si..p|
|00001110| 75 73 68 20 64 73 0a 09 | 6d 6f 76 20 73 69 2c 20 |ush ds..|mov si, |
|00001120| 5b 62 70 2b 58 5d 09 09 | 09 3b 20 73 74 72 69 6e |[bp+X]..|.; strin|
|00001130| 67 20 6f 66 66 73 65 74 | 0a 0a 69 66 64 65 66 20 |g offset|..ifdef |
|00001140| 4c 41 52 47 45 5f 44 41 | 54 41 0a 09 6d 6f 76 20 |LARGE_DA|TA..mov |
|00001150| 64 73 2c 20 5b 62 70 2b | 58 2b 32 5d 09 09 3b 20 |ds, [bp+|X+2]..; |
|00001160| 73 74 72 69 6e 67 20 73 | 65 67 6d 65 6e 74 0a 09 |string s|egment..|
|00001170| 6d 6f 76 20 63 78 2c 20 | 5b 62 70 2b 58 2b 34 5d |mov cx, |[bp+X+4]|
|00001180| 09 09 3b 20 72 6f 77 0a | 09 6d 6f 76 20 62 78 2c |..; row.|.mov bx,|
|00001190| 20 5b 62 70 2b 58 2b 36 | 5d 09 09 3b 20 63 6f 6c | [bp+X+6|]..; col|
|000011a0| 0a 65 6c 73 65 0a 09 6d | 6f 76 20 63 78 2c 20 5b |.else..m|ov cx, [|
|000011b0| 62 70 2b 58 2b 32 5d 09 | 09 3b 20 72 6f 77 0a 09 |bp+X+2].|.; row..|
|000011c0| 6d 6f 76 20 62 78 2c 20 | 5b 62 70 2b 58 2b 34 5d |mov bx, |[bp+X+4]|
|000011d0| 09 09 3b 20 63 6f 6c 0a | 65 6e 64 69 66 0a 0a 70 |..; col.|endif..p|
|000011e0| 6c 6f 6f 70 3a 09 6c 6f | 64 73 62 09 09 09 09 3b |loop:.lo|dsb....;|
|000011f0| 20 67 65 74 20 6e 65 78 | 74 20 63 68 61 72 0a 09 | get nex|t char..|
|00001200| 6f 72 09 61 6c 2c 20 61 | 6c 09 09 09 3b 20 65 6e |or.al, a|l...; en|
|00001210| 64 20 6f 66 20 64 69 73 | 70 6c 61 79 3f 0a 09 6a |d of dis|play?..j|
|00001220| 65 09 70 64 6f 6e 65 0a | 09 63 61 6c 6c 20 6e 65 |e.pdone.|.call ne|
|00001230| 61 72 20 70 74 72 20 64 | 69 73 70 6c 61 79 0a 09 |ar ptr d|isplay..|
|00001240| 69 6e 63 09 62 78 09 09 | 09 3b 20 62 75 6d 70 20 |inc.bx..|.; bump |
|00001250| 74 6f 20 6e 65 78 74 20 | 63 6f 6c 75 6d 6e 0a 09 |to next |column..|
|00001260| 6a 6d 70 09 70 6c 6f 6f | 70 0a 70 64 6f 6e 65 3a |jmp.ploo|p.pdone:|
|00001270| 09 70 6f 70 20 64 73 0a | 09 70 6f 70 20 73 69 0a |.pop ds.|.pop si.|
|00001280| 09 70 6f 70 20 62 70 0a | 09 72 65 74 0a 5f 48 5f |.pop bp.|.ret._H_|
|00001290| 70 75 74 73 09 65 6e 64 | 70 0a 0a 3b 0a 3b 20 64 |puts.end|p..;.; d|
|000012a0| 69 73 70 6c 61 79 20 2d | 20 6f 75 74 70 75 74 20 |isplay -| output |
|000012b0| 61 6e 20 38 78 38 20 63 | 68 61 72 61 63 74 65 72 |an 8x8 c|haracter|
|000012c0| 20 66 72 6f 6d 20 74 68 | 65 20 49 42 4d 20 52 4f | from th|e IBM RO|
|000012d0| 4d 20 74 6f 20 74 68 65 | 20 48 65 72 63 20 62 6f |M to the| Herc bo|
|000012e0| 61 72 64 0a 3b 0a 3b 20 | 41 58 20 3d 20 63 68 61 |ard.;.; |AX = cha|
|000012f0| 72 2c 20 42 58 20 3d 20 | 63 6f 6c 75 6d 6e 20 28 |r, BX = |column (|
|00001300| 30 2d 38 39 29 2c 20 43 | 58 20 3d 20 72 6f 77 28 |0-89), C|X = row(|
|00001310| 30 2d 34 32 29 20 20 2a | 2a 20 61 6c 6c 20 70 72 |0-42) *|* all pr|
|00001320| 65 73 65 72 76 65 64 20 | 2a 2a 0a 3b 0a 43 4f 4e |eserved |**.;.CON|
|00001330| 38 09 64 62 09 38 0a 43 | 4f 4e 31 38 30 09 64 62 |8.db.8.C|ON180.db|
|00001340| 09 31 38 30 0a 49 42 4d | 52 4f 4d 09 65 71 75 09 |.180.IBM|ROM.equ.|
|00001350| 30 46 30 30 30 68 0a 43 | 48 41 52 54 41 42 09 65 |0F000h.C|HARTAB.e|
|00001360| 71 75 09 30 46 41 36 45 | 68 0a 0a 64 69 73 70 6c |qu.0FA6E|h..displ|
|00001370| 61 79 09 70 72 6f 63 20 | 6e 65 61 72 0a 09 70 75 |ay.proc |near..pu|
|00001380| 73 68 09 64 73 09 09 09 | 3b 20 73 61 76 65 20 74 |sh.ds...|; save t|
|00001390| 68 65 20 6c 6f 74 0a 09 | 70 75 73 68 09 65 73 0a |he lot..|push.es.|
|000013a0| 09 70 75 73 68 09 61 78 | 0a 09 70 75 73 68 09 62 |.push.ax|..push.b|
|000013b0| 78 0a 09 70 75 73 68 09 | 63 78 0a 09 70 75 73 68 |x..push.|cx..push|
|000013c0| 09 64 78 0a 09 70 75 73 | 68 09 73 69 0a 09 70 75 |.dx..pus|h.si..pu|
|000013d0| 73 68 09 64 69 0a 0a 3b | 20 73 65 74 75 70 20 64 |sh.di..;| setup d|
|000013e0| 73 20 2d 3e 20 49 42 4d | 20 52 4f 4d 2c 20 61 6e |s -> IBM| ROM, an|
|000013f0| 64 20 73 69 20 2d 3e 20 | 69 6e 64 65 78 20 69 6e |d si -> |index in|
|00001400| 74 6f 20 49 42 4d 20 52 | 4f 4d 20 63 68 61 72 61 |to IBM R|OM chara|
|00001410| 63 74 65 72 20 74 61 62 | 6c 65 20 6c 6f 63 61 74 |cter tab|le locat|
|00001420| 65 64 0a 3b 09 61 74 20 | 30 66 61 36 65 68 20 69 |ed.;.at |0fa6eh i|
|00001430| 6e 20 74 68 65 20 52 4f | 4d 0a 0a 09 61 6e 64 09 |n the RO|M...and.|
|00001440| 61 78 2c 20 30 37 66 68 | 0a 09 6d 75 6c 09 63 73 |ax, 07fh|..mul.cs|
|00001450| 3a 43 4f 4e 38 09 09 09 | 3b 20 6d 75 6c 74 20 62 |:CON8...|; mult b|
|00001460| 79 20 38 20 62 79 74 65 | 73 20 6f 66 20 74 61 62 |y 8 byte|s of tab|
|00001470| 6c 65 20 70 65 72 20 63 | 68 61 72 0a 09 6d 6f 76 |le per c|har..mov|
|00001480| 09 73 69 2c 20 61 78 0a | 09 6d 6f 76 09 61 78 2c |.si, ax.|.mov.ax,|
|00001490| 20 49 42 4d 52 4f 4d 0a | 09 6d 6f 76 09 64 73 2c | IBMROM.|.mov.ds,|
|000014a0| 20 61 78 0a 09 61 73 73 | 75 6d 65 09 64 73 3a 6e | ax..ass|ume.ds:n|
|000014b0| 6f 74 68 69 6e 67 0a 09 | 61 64 64 09 73 69 2c 20 |othing..|add.si, |
|000014c0| 43 48 41 52 54 41 42 09 | 09 3b 20 61 64 64 20 6f |CHARTAB.|.; add o|
|000014d0| 66 66 73 65 74 20 6f 66 | 20 63 68 61 72 61 63 74 |ffset of| charact|
|000014e0| 65 72 20 74 61 62 6c 65 | 0a 0a 3b 20 63 6f 6d 70 |er table|..; comp|
|000014f0| 75 74 65 20 69 6e 64 65 | 78 20 69 6e 74 6f 20 48 |ute inde|x into H|
|00001500| 65 72 63 75 6c 65 73 20 | 73 63 72 65 65 6e 20 6d |ercules |screen m|
|00001510| 65 6d 6f 72 79 20 66 6f | 72 20 73 63 61 6e 20 6c |emory fo|r scan l|
|00001520| 69 6e 65 20 30 2e 20 20 | 54 68 65 20 72 65 6d 61 |ine 0. |The rema|
|00001530| 69 6e 69 6e 67 0a 3b 09 | 73 65 76 65 6e 20 73 63 |ining.;.|seven sc|
|00001540| 61 6e 20 6c 69 6e 65 73 | 20 61 72 65 20 61 6c 6c |an lines| are all|
|00001550| 20 61 74 20 66 69 78 65 | 64 20 6f 66 66 73 65 74 | at fixe|d offset|
|00001560| 73 20 66 72 6f 6d 20 74 | 68 65 20 66 69 72 73 74 |s from t|he first|
|00001570| 2e 0a 3b 0a 3b 09 53 69 | 6e 63 65 20 67 72 61 70 |..;.;.Si|nce grap|
|00001580| 68 69 63 73 20 6d 6f 64 | 65 20 74 72 65 61 74 73 |hics mod|e treats|
|00001590| 20 74 68 65 20 73 63 72 | 65 65 6e 20 61 73 20 73 | the scr|een as s|
|000015a0| 65 74 73 20 6f 66 20 31 | 36 78 34 20 22 63 68 61 |ets of 1|6x4 "cha|
|000015b0| 72 61 63 74 65 72 73 22 | 2c 0a 3b 09 77 65 20 6e |racters"|,.;.we n|
|000015c0| 65 65 64 20 74 6f 20 6d | 61 70 20 61 6e 20 38 78 |eed to m|ap an 8x|
|000015d0| 38 20 72 65 61 6c 20 63 | 68 61 72 61 63 74 65 72 |8 real c|haracter|
|000015e0| 20 6f 6e 74 6f 20 74 68 | 65 20 66 72 6f 6e 74 20 | onto th|e front |
|000015f0| 6f 72 20 62 61 63 6b 20 | 6f 66 0a 3b 09 61 20 70 |or back |of.;.a p|
|00001600| 61 69 72 20 6f 66 20 67 | 72 61 70 68 69 63 73 20 |air of g|raphics |
|00001610| 22 63 68 61 72 61 63 74 | 65 72 73 22 2e 20 20 54 |"charact|ers". T|
|00001620| 68 65 20 66 69 72 73 74 | 20 66 6f 75 72 20 73 63 |he first| four sc|
|00001630| 61 6e 20 6c 69 6e 65 73 | 20 6f 66 20 6f 75 72 0a |an lines| of our.|
|00001640| 3b 09 38 78 38 20 63 68 | 61 72 61 63 74 65 72 20 |;.8x8 ch|aracter |
|00001650| 77 69 6c 6c 20 6d 61 70 | 20 74 6f 20 74 68 65 20 |will map| to the |
|00001660| 74 6f 70 20 67 72 61 70 | 68 69 63 73 20 22 63 68 |top grap|hics "ch|
|00001670| 61 72 61 63 74 65 72 22 | 2c 20 61 6e 64 20 74 68 |aracter"|, and th|
|00001680| 65 20 73 65 63 6f 6e 64 | 0a 3b 09 66 6f 75 72 20 |e second|.;.four |
|00001690| 73 63 61 6e 20 6c 69 6e | 65 73 20 6d 61 70 20 74 |scan lin|es map t|
|000016a0| 6f 20 74 68 65 20 67 72 | 61 70 68 69 63 73 20 63 |o the gr|aphics c|
|000016b0| 68 61 72 61 63 74 65 72 | 20 6f 6e 20 74 68 65 20 |haracter| on the |
|000016c0| 22 6c 69 6e 65 22 20 28 | 34 20 73 63 61 6e 0a 3b |"line" (|4 scan.;|
|000016d0| 09 6c 69 6e 65 73 20 68 | 69 67 68 29 20 62 65 6c |.lines h|igh) bel|
|000016e0| 6f 77 20 69 74 2e 0a 3b | 0a 3b 09 46 6f 72 20 73 |ow it..;|.;.For s|
|000016f0| 6f 6d 65 20 65 78 6f 74 | 69 63 20 68 61 72 64 77 |ome exot|ic hardw|
|00001700| 61 72 65 20 72 65 61 73 | 6f 6e 20 28 70 72 6f 62 |are reas|on (prob|
|00001710| 61 62 6c 79 20 73 70 65 | 65 64 29 2c 20 61 6c 6c |ably spe|ed), all|
|00001720| 20 73 63 61 6e 20 6c 69 | 6e 65 20 30 0a 3b 09 62 | scan li|ne 0.;.b|
|00001730| 69 74 73 20 28 69 2e 65 | 2e 20 65 76 65 72 79 20 |its (i.e|. every |
|00001740| 66 6f 75 72 74 68 20 73 | 63 61 6e 20 6c 69 6e 65 |fourth s|can line|
|00001750| 29 20 61 72 65 20 73 74 | 6f 72 65 64 20 69 6e 20 |) are st|ored in |
|00001760| 6d 65 6d 6f 72 79 20 6c | 6f 63 61 74 69 6f 6e 73 |memory l|ocations|
|00001770| 0a 3b 09 30 2d 32 30 30 | 30 68 20 69 6e 20 74 68 |.;.0-200|0h in th|
|00001780| 65 20 73 63 72 65 65 6e | 20 62 75 66 66 65 72 2e |e screen| buffer.|
|00001790| 20 20 41 6c 6c 20 73 63 | 61 6e 20 6c 69 6e 65 20 | All sc|an line |
|000017a0| 31 20 62 69 74 73 20 61 | 72 65 20 73 74 6f 72 65 |1 bits a|re store|
|000017b0| 64 0a 3b 09 32 30 30 30 | 68 2d 34 30 30 30 68 2e |d.;.2000|h-4000h.|
|000017c0| 20 20 57 69 74 68 69 6e | 20 74 68 65 73 65 20 62 | Within| these b|
|000017d0| 61 6e 6b 73 2c 20 74 68 | 65 79 20 61 72 65 20 73 |anks, th|ey are s|
|000017e0| 74 6f 72 65 64 20 62 79 | 20 72 6f 77 73 2e 20 20 |tored by| rows. |
|000017f0| 54 68 65 20 66 69 72 73 | 74 0a 3b 09 73 63 61 6e |The firs|t.;.scan|
|00001800| 20 6c 69 6e 65 20 6f 6e | 20 74 68 65 20 73 63 72 | line on| the scr|
|00001810| 65 65 6e 20 28 73 63 61 | 6e 20 6c 69 6e 65 20 30 |een (sca|n line 0|
|00001820| 20 6f 66 20 67 72 61 70 | 68 69 63 73 20 63 68 61 | of grap|hics cha|
|00001830| 72 61 63 74 65 72 20 72 | 6f 77 20 30 29 0a 3b 09 |racter r|ow 0).;.|
|00001840| 69 73 20 74 68 65 20 66 | 69 72 73 74 20 34 35 20 |is the f|irst 45 |
|00001850| 77 6f 72 64 73 20 6f 66 | 20 6d 65 6d 6f 72 79 20 |words of| memory |
|00001860| 69 6e 20 74 68 65 20 73 | 63 72 65 65 6e 20 62 75 |in the s|creen bu|
|00001870| 66 66 65 72 2e 20 20 54 | 68 65 20 6e 65 78 74 20 |ffer. T|he next |
|00001880| 34 35 0a 3b 09 77 6f 72 | 64 73 20 61 72 65 20 74 |45.;.wor|ds are t|
|00001890| 68 65 20 66 69 72 73 74 | 20 73 63 61 6e 20 6c 69 |he first| scan li|
|000018a0| 6e 65 20 67 72 61 70 68 | 69 63 73 20 72 6f 77 20 |ne graph|ics row |
|000018b0| 31 2c 20 61 6e 64 20 73 | 69 6e 63 65 20 67 72 61 |1, and s|ince gra|
|000018c0| 70 68 69 63 73 0a 3b 09 | 22 63 68 61 72 61 63 74 |phics.;.|"charact|
|000018d0| 65 72 73 22 20 61 72 65 | 20 34 20 62 69 74 73 20 |ers" are| 4 bits |
|000018e0| 68 69 67 68 2c 20 74 68 | 69 73 20 73 65 63 6f 6e |high, th|is secon|
|000018f0| 64 20 73 63 61 6e 20 6c | 69 6e 65 20 69 73 20 70 |d scan l|ine is p|
|00001900| 68 79 73 69 63 61 6c 6c | 79 0a 3b 09 74 68 65 20 |hysicall|y.;.the |
|00001910| 66 69 66 74 68 20 73 63 | 61 6e 20 6c 69 6e 65 20 |fifth sc|an line |
|00001920| 64 69 73 70 6c 61 79 65 | 64 20 6f 6e 20 74 68 65 |displaye|d on the|
|00001930| 20 73 63 72 65 65 6e 2e | 0a 3b 0a 3b 09 53 4f 2c | screen.|.;.;.SO,|
|00001940| 20 74 6f 20 64 69 73 70 | 6c 61 79 20 61 6e 20 38 | to disp|lay an 8|
|00001950| 78 38 20 63 68 61 72 61 | 63 74 65 72 2c 20 74 68 |x8 chara|cter, th|
|00001960| 65 20 31 73 74 20 61 6e | 64 20 35 74 68 20 72 6f |e 1st an|d 5th ro|
|00001970| 77 73 20 6f 66 20 64 6f | 74 73 20 61 72 65 0a 3b |ws of do|ts are.;|
|00001980| 09 62 6f 74 68 20 73 63 | 61 6e 20 6c 69 6e 65 20 |.both sc|an line |
|00001990| 30 20 6f 66 20 74 68 65 | 20 67 72 61 70 68 69 63 |0 of the| graphic|
|000019a0| 73 20 22 63 68 61 72 61 | 63 74 65 72 22 2c 20 74 |s "chara|cter", t|
|000019b0| 68 65 20 32 6e 64 20 61 | 6e 64 20 36 74 68 20 61 |he 2nd a|nd 6th a|
|000019c0| 72 65 0a 3b 09 73 63 61 | 6e 20 6c 69 6e 65 20 31 |re.;.sca|n line 1|
|000019d0| 2c 20 61 6e 64 20 73 6f | 20 6f 6e 2e 0a 3b 0a 3b |, and so| on..;.;|
|000019e0| 09 54 68 65 20 63 6f 6c | 75 6d 6e 20 28 30 2d 38 |.The col|umn (0-8|
|000019f0| 39 29 20 74 65 6c 6c 73 | 20 77 68 69 63 68 20 62 |9) tells| which b|
|00001a00| 79 74 65 20 69 6e 20 61 | 20 73 63 61 6e 20 6c 69 |yte in a| scan li|
|00001a10| 6e 65 20 77 65 20 6e 65 | 65 64 20 74 6f 20 6c 6f |ne we ne|ed to lo|
|00001a20| 61 64 2e 0a 3b 09 53 69 | 6e 63 65 20 69 74 20 74 |ad..;.Si|nce it t|
|00001a30| 61 6b 65 73 20 74 77 6f | 20 72 6f 77 73 20 6f 66 |akes two| rows of|
|00001a40| 20 67 72 61 70 68 69 63 | 73 20 63 68 61 72 61 63 | graphic|s charac|
|00001a50| 74 65 72 73 20 74 6f 20 | 68 6f 6c 64 20 6f 6e 65 |ters to |hold one|
|00001a60| 20 72 6f 77 20 6f 66 0a | 3b 09 6f 75 72 20 63 68 | row of.|;.our ch|
|00001a70| 61 72 61 63 74 65 72 73 | 2c 20 63 6f 6c 75 6d 6e |aracters|, column|
|00001a80| 2b 39 30 20 69 73 20 61 | 20 69 6e 64 65 78 20 74 |+90 is a| index t|
|00001a90| 6f 20 73 63 61 6e 20 6c | 69 6e 65 20 34 20 72 6f |o scan l|ine 4 ro|
|00001aa0| 77 73 20 6f 66 20 70 69 | 78 65 6c 73 0a 3b 09 68 |ws of pi|xels.;.h|
|00001ab0| 69 67 68 65 72 20 28 6e | 2b 34 29 2e 20 20 54 68 |igher (n|+4). Th|
|00001ac0| 75 73 20 31 38 30 20 62 | 79 74 65 73 20 6f 66 20 |us 180 b|ytes of |
|00001ad0| 73 63 72 65 65 6e 20 6d | 65 6d 6f 72 79 20 69 6e |screen m|emory in|
|00001ae0| 20 61 6e 79 20 62 61 6e | 6b 20 28 30 68 2c 20 32 | any ban|k (0h, 2|
|00001af0| 30 30 30 68 2c 0a 3b 09 | 34 30 30 30 68 2c 20 36 |000h,.;.|4000h, 6|
|00001b00| 30 30 30 68 29 20 72 65 | 70 72 65 73 65 6e 74 20 |000h) re|present |
|00001b10| 61 20 72 6f 77 20 6f 66 | 20 38 78 38 20 63 68 61 |a row of| 8x8 cha|
|00001b20| 72 61 63 74 65 72 73 2e | 0a 3b 09 0a 3b 09 54 68 |racters.|.;..;.Th|
|00001b30| 65 20 73 74 61 72 74 69 | 6e 67 20 6c 6f 63 61 74 |e starti|ng locat|
|00001b40| 69 6f 6e 20 69 6e 20 73 | 63 72 65 65 6e 20 6d 65 |ion in s|creen me|
|00001b50| 6d 6f 72 79 20 66 6f 72 | 20 74 68 65 20 66 69 72 |mory for| the fir|
|00001b60| 73 74 20 73 63 61 6e 20 | 6c 69 6e 65 20 6f 66 0a |st scan |line of.|
|00001b70| 3b 09 61 20 63 68 61 72 | 61 63 74 65 72 20 74 6f |;.a char|acter to|
|00001b80| 20 62 65 20 64 69 73 70 | 6c 61 79 65 64 20 77 69 | be disp|layed wi|
|00001b90| 6c 6c 20 62 65 3a 20 20 | 09 28 72 6f 77 2a 31 38 |ll be: |.(row*18|
|00001ba0| 30 29 2b 63 6f 6c 75 6d | 6e 0a 3b 09 54 68 65 20 |0)+colum|n.;.The |
|00001bb0| 35 74 68 20 73 63 61 6e | 20 6c 69 6e 65 20 77 69 |5th scan| line wi|
|00001bc0| 6c 6c 20 62 65 20 61 74 | 3a 09 09 28 72 6f 77 2a |ll be at|:..(row*|
|00001bd0| 31 38 30 29 2b 63 6f 6c | 75 6d 6e 2b 39 30 0a 3b |180)+col|umn+90.;|
|00001be0| 0a 3b 09 54 68 65 20 73 | 65 63 6f 6e 64 20 61 6e |.;.The s|econd an|
|00001bf0| 64 20 36 74 68 20 73 63 | 61 6e 20 6c 69 6e 65 73 |d 6th sc|an lines|
|00001c00| 20 77 69 6c 6c 20 62 65 | 20 61 74 20 74 68 65 20 | will be| at the |
|00001c10| 61 62 6f 76 65 20 6f 66 | 66 73 65 74 73 20 70 6c |above of|fsets pl|
|00001c20| 75 73 0a 3b 09 74 68 65 | 20 62 61 6e 6b 20 6f 66 |us.;.the| bank of|
|00001c30| 66 73 65 74 20 6f 66 20 | 32 30 30 30 68 2e 20 20 |fset of |2000h. |
|00001c40| 54 68 65 20 74 68 69 72 | 64 20 61 6e 64 20 37 74 |The thir|d and 7t|
|00001c50| 68 2c 20 61 64 64 20 34 | 30 30 30 68 20 61 6e 64 |h, add 4|000h and|
|00001c60| 20 66 69 6e 61 6c 6c 79 | 0a 3b 09 74 68 65 20 34 | finally|.;.the 4|
|00001c70| 74 68 20 61 6e 64 20 38 | 74 68 2c 20 61 64 64 20 |th and 8|th, add |
|00001c80| 36 30 30 30 68 2e 0a 3b | 0a 09 6d 6f 76 09 61 78 |6000h..;|..mov.ax|
|00001c90| 2c 20 47 50 67 31 5f 42 | 61 73 65 0a 09 6d 6f 76 |, GPg1_B|ase..mov|
|00001ca0| 09 65 73 2c 20 61 78 09 | 09 09 3b 20 65 73 20 3d |.es, ax.|..; es =|
|00001cb0| 20 68 65 72 63 75 6c 65 | 73 20 70 61 67 65 20 30 | hercule|s page 0|
|00001cc0| 0a 09 6d 6f 76 09 61 78 | 2c 20 63 78 09 09 09 3b |..mov.ax|, cx...;|
|00001cd0| 20 67 65 74 20 72 6f 77 | 0a 09 6d 75 6c 09 63 73 | get row|..mul.cs|
|00001ce0| 3a 43 4f 4e 31 38 30 09 | 09 3b 20 6d 75 6c 74 20 |:CON180.|.; mult |
|00001cf0| 62 79 20 31 38 30 28 31 | 30 29 0a 09 6d 6f 76 09 |by 180(1|0)..mov.|
|00001d00| 64 69 2c 20 61 78 09 09 | 09 3b 20 64 69 20 3d 20 |di, ax..|.; di = |
|00001d10| 69 6e 64 65 78 20 72 65 | 67 0a 09 63 6c 64 09 09 |index re|g..cld..|
|00001d20| 09 09 3b 20 69 6e 73 75 | 72 65 20 72 69 67 68 74 |..; insu|re right|
|00001d30| 20 64 69 72 65 63 74 69 | 6f 6e 0a 0a 3b 6f 75 74 | directi|on..;out|
|00001d40| 70 75 74 20 38 20 73 65 | 67 6d 65 6e 74 73 20 6f |put 8 se|gments o|
|00001d50| 66 20 63 68 61 72 61 63 | 74 65 72 20 74 6f 20 76 |f charac|ter to v|
|00001d60| 69 64 65 6f 20 72 61 6d | 0a 0a 09 6c 6f 64 73 62 |ideo ram|...lodsb|
|00001d70| 09 09 09 09 3b 20 6c 69 | 6e 65 20 30 0a 09 6d 6f |....; li|ne 0..mo|
|00001d80| 76 09 65 73 3a 5b 64 69 | 2b 62 78 5d 2c 20 61 6c |v.es:[di|+bx], al|
|00001d90| 0a 09 6c 6f 64 73 62 0a | 09 6d 6f 76 09 65 73 3a |..lodsb.|.mov.es:|
|00001da0| 5b 64 69 2b 62 78 2b 32 | 30 30 30 68 5d 2c 20 61 |[di+bx+2|000h], a|
|00001db0| 6c 09 3b 20 6c 69 6e 65 | 20 31 0a 09 6c 6f 64 73 |l.; line| 1..lods|
|00001dc0| 62 0a 09 6d 6f 76 09 65 | 73 3a 5b 64 69 2b 62 78 |b..mov.e|s:[di+bx|
|00001dd0| 2b 34 30 30 30 68 5d 2c | 20 61 6c 09 3b 20 6c 69 |+4000h],| al.; li|
|00001de0| 6e 65 20 32 0a 09 6c 6f | 64 73 62 0a 09 6d 6f 76 |ne 2..lo|dsb..mov|
|00001df0| 09 65 73 3a 5b 64 69 2b | 62 78 2b 36 30 30 30 68 |.es:[di+|bx+6000h|
|00001e00| 5d 2c 20 61 6c 09 3b 20 | 6c 69 6e 65 20 33 0a 09 |], al.; |line 3..|
|00001e10| 6c 6f 64 73 62 0a 09 6d | 6f 76 09 65 73 3a 5b 64 |lodsb..m|ov.es:[d|
|00001e20| 69 2b 62 78 2b 39 30 5d | 2c 20 61 6c 09 3b 20 6c |i+bx+90]|, al.; l|
|00001e30| 69 6e 65 20 34 0a 09 6c | 6f 64 73 62 0a 09 6d 6f |ine 4..l|odsb..mo|
|00001e40| 76 09 65 73 3a 5b 64 69 | 2b 62 78 2b 32 30 30 30 |v.es:[di|+bx+2000|
|00001e50| 68 2b 39 30 5d 2c 20 61 | 6c 09 3b 20 6c 69 6e 65 |h+90], a|l.; line|
|00001e60| 20 35 0a 09 6c 6f 64 73 | 62 0a 09 6d 6f 76 09 65 | 5..lods|b..mov.e|
|00001e70| 73 3a 5b 64 69 2b 62 78 | 2b 34 30 30 30 68 2b 39 |s:[di+bx|+4000h+9|
|00001e80| 30 5d 2c 20 61 6c 09 3b | 20 6c 69 6e 65 20 36 0a |0], al.;| line 6.|
|00001e90| 09 6c 6f 64 73 62 0a 09 | 6d 6f 76 09 65 73 3a 5b |.lodsb..|mov.es:[|
|00001ea0| 64 69 2b 62 78 2b 36 30 | 30 30 68 2b 39 30 5d 2c |di+bx+60|00h+90],|
|00001eb0| 20 61 6c 09 3b 20 6c 69 | 6e 65 20 37 0a 0a 09 70 | al.; li|ne 7...p|
|00001ec0| 6f 70 09 64 69 0a 09 70 | 6f 70 09 73 69 0a 09 70 |op.di..p|op.si..p|
|00001ed0| 6f 70 09 64 78 0a 09 70 | 6f 70 09 63 78 0a 09 70 |op.dx..p|op.cx..p|
|00001ee0| 6f 70 09 62 78 0a 09 70 | 6f 70 09 61 78 0a 09 70 |op.bx..p|op.ax..p|
|00001ef0| 6f 70 09 65 73 0a 09 70 | 6f 70 09 64 73 0a 09 72 |op.es..p|op.ds..r|
|00001f00| 65 74 0a 64 69 73 70 6c | 61 79 09 65 6e 64 70 0a |et.displ|ay.endp.|
|00001f10| 0a 5f 74 65 78 74 09 65 | 6e 64 73 0a 0a 5f 64 61 |._text.e|nds.._da|
|00001f20| 74 61 09 73 65 67 6d 65 | 6e 74 0a 62 6d 61 73 6b |ta.segme|nt.bmask|
|00001f30| 09 64 77 20 2d 31 0a 63 | 6f 6c 6f 72 09 64 62 20 |.dw -1.c|olor.db |
|00001f40| 31 0a 5f 64 61 74 61 09 | 65 6e 64 73 0a 0a 63 6f |1._data.|ends..co|
|00001f50| 6e 73 74 09 73 65 67 6d | 65 6e 74 0a 48 43 68 5f |nst.segm|ent.HCh_|
|00001f60| 50 61 72 6d 73 20 64 62 | 20 09 36 31 48 2c 20 35 |Parms db| .61H, 5|
|00001f70| 30 48 2c 20 35 32 48 2c | 20 30 46 48 2c 20 31 39 |0H, 52H,| 0FH, 19|
|00001f80| 48 2c 20 30 36 48 2c 20 | 31 39 48 2c 20 31 39 48 |H, 06H, |19H, 19H|
|00001f90| 2c 20 30 32 48 2c 20 30 | 44 48 2c 20 30 42 48 2c |, 02H, 0|DH, 0BH,|
|00001fa0| 20 30 43 48 0a 48 47 72 | 5f 50 61 72 6d 73 20 64 | 0CH.HGr|_Parms d|
|00001fb0| 62 09 33 35 48 2c 20 32 | 44 48 2c 20 32 45 48 2c |b.35H, 2|DH, 2EH,|
|00001fc0| 20 30 37 48 2c 20 35 42 | 48 2c 20 30 32 48 2c 20 | 07H, 5B|H, 02H, |
|00001fd0| 35 37 48 2c 20 35 37 48 | 2c 20 30 32 48 2c 20 30 |57H, 57H|, 02H, 0|
|00001fe0| 33 48 2c 20 30 30 48 2c | 20 30 30 48 0a 63 6f 6e |3H, 00H,| 00H.con|
|00001ff0| 73 74 09 65 6e 64 73 0a | 0a 09 65 6e 64 0a 0a 0a |st.ends.|..end...|
+--------+-------------------------+-------------------------+--------+--------+